#ifndef TOAST_H
#define TOAST_H

#include <QTimer>
#include <QMessageBox>

class Toast {
public:
    static void show(QWidget* parent, const QString& text, int duration=1000) {
        QMessageBox* msgBox = new QMessageBox(parent);
        msgBox->setText(text);
        msgBox->show();

        QTimer::singleShot(duration, msgBox, &QMessageBox::deleteLater);
    }
};

#endif // TOAST_H
